import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map/src/map/map.dart';
import 'package:leaflet_geo_fence_app/plugin/userlocation/user_location_layer.dart';
import 'package:leaflet_geo_fence_app/plugin/userlocation/user_location_options.dart';

///@className user_location_plugin
///@author liaoyu
///@version 1.0.0
///@description 地理位置
///@createTime 2021/1/12 14:36
class UserLocationPlugin extends MapPlugin {
  @override
  Widget createLayer(LayerOptions options, MapState mapState, Stream<Null> stream) {
    return UserLocationLayer(options: options,mapState: mapState,stream: stream);
  }

  @override
  bool supportsLayer(LayerOptions options) {
    return options is UserLocationOptions;
  }

}